package com.syh.jn.scm.infrastructure.repository.model.base;

import com.syh.jn.scm.infrastructure.repository.model.base.support.SuperBusinessEntityModel;
import lombok.*;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 供应商主体
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Entity
@Table(name = "T_BASE_SUPPLIER")
@EqualsAndHashCode(callSuper = true)
public class SupplierModel extends SuperBusinessEntityModel {
  /**
   * 合同附件图片url,保存格式[{name: 'food.jpg', url: 'https://xxx.cdn.com/xxx.jpg'}]
   */
  @Column(name = "CONTRACT", columnDefinition = "varchar(1000) COMMENT '合同附件图片url'")
  private String contract;
  /**
   * 是否是合资、子公司: -1不是, 1是
   */
  @Column(name = "IS_SUBSIDIARY", columnDefinition = "smallint COMMENT '是否是子公司: -1不是, 1是'")
  private Short isSubsidiary;
  /**
   * 开账状态: 0未开账, 1已开账
   */
  @Column(name = "OPEN_ACCOUNT_STATE", columnDefinition = "smallint COMMENT '开账状态: 0未开账, 1已开账'")
  private Short openAccountState;
  /**
   * 开账时间
   */
  @Column(name = "OPEN_ACCOUNT_TIME_STAMP", columnDefinition = "bigint COMMENT '开账时间'")
  private Long openAccountTimeStamp;
}
